package it.uniroma2.mpsr.resources;

public class MVAResults {

	private String[] centresNames;
	private double[] residenceTime;
	private double[] lambda;
	private double[] meanPops;
	private double[] responseTime;
	private double[] U;
	private double[] cycleTime;
	private double[] totThroughput;



	public MVAResults(Centre[] centres, double[] residenceTime,
			double[] lambda, double[] meanPops, double[] responseTime,
			double[] u, double[] cycleTime, double[] totThroughput) {
		centresNames = new String[centres.length];
		for(int i = 0; i < centres.length; i++)
			centresNames[i] = centres[i].getName();
		this.residenceTime = residenceTime;
		this.lambda = lambda;
		this.meanPops = meanPops;
		this.responseTime = responseTime;
		U = u;
		this.cycleTime = cycleTime;
		this.totThroughput = totThroughput;
	}



	public void print() {
		System.out.print("Risultati MVA sul Modello 2:\n\t\t\t\t\t\t\t");
		for(int i = 0; i < centresNames.length; i++)
			System.out.print("\t" + centresNames[i] + "\t");
		System.out.print("\n\tTempi medi di risposta:\t\t\t");
		for(int i = 0; i < responseTime.length; i++)
			System.out.print("\t" + responseTime[i]);
		System.out.print("\n\tTempi medi di residenza:\t\t");
		for(int i = 0; i < residenceTime.length; i++)
			System.out.print("\t" + residenceTime[i]);
		System.out.print("\n\tThroughput:\t\t\t\t");
		for(int i = 0; i < lambda.length; i++)
			System.out.print("\t" + lambda[i]);
		System.out.print("\n\tPopolazioni medie:\t\t\t");
		for(int i = 0; i < meanPops.length; i++)
			System.out.print("\t" + meanPops[i]);
		System.out.print("\n\tUtilizzazioni:\t\t\t\t");
		for(int i = 0; i < U.length; i++)
			System.out.print("\t" + U[i]);
		System.out.print("\n\tTempi medi di ciclo:\t\t\t");
		for(int i = 0; i < cycleTime.length; i++)
			System.out.print("\t" + cycleTime[i]);
		System.out.print("\n\tThroughput impianto risp. al centro:\t");
		for(int i = 0; i < totThroughput.length; i++)
			System.out.print("\t" + totThroughput[i]);
	}

	public String[] getCentresNames() {
		return centresNames;
	}

	public double[] getResidenceTime() {
		return residenceTime;
	}

	public double[] getLambda() {
		return lambda;
	}

	public double[] getMeanPops() {
		return meanPops;
	}

	public double[] getResponseTime() {
		return responseTime;
	}

	public double[] getU() {
		return U;
	}

	public double[] getCycleTime() {
		return cycleTime;
	}

	public double[] getTotThroughput() {
		return totThroughput;
	}
	
}
